package com.zzw.hj62;

import java.util.Scanner;

/**
 * @Project: hw_java
 * @Description: 查找输入整数二进制中1的个数
 * @Author: zzw
 */
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {
            int n = in.nextInt();
            int count = 0;
            while (n > 0) {
                int rem = n % 2;
                if (rem == 1) {
                    count++;
                }
                n = n / 2;
            }
            System.out.println(count);
        }
    }
}